<!DOCTYPE html>
<!--办公安全分委会积分考核-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

</head>

<body>
    
<div id="app" v-cloak>   
        <el-form label-position="right" ref="form" :inline="true" :model="formInline" class="demo-form-inline"
            style="margin-bottom: 15px;">
            <el-row>
                <el-col class="head-tool">
                    <el-button type="primary" @click="onSubmit">{{col.btnSelect}}</el-button>
                    <el-button type="primary" @click="UserInput('tj')">{{col.btnAdd}}</el-button>
                    <btn-uploadfile-list  url="xxxx"></btn-uploadfile-list>
                    <btn-export-list url="xxxx" :forminline="this.formInline"></btn-export-list>
                    <el-button type="primary" @click="onDelete">{{col.btnDownLoadTemplate}}</el-button>
                    <el-button type="danger" @click="onDelete">{{col.btnDelete}}</el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="6" :sm="6" :md="6" :lg="4" :xl="4">
                    <div class="elst-select-mini">
                        <el-form-item>
                            <el-input v-model="formInline.model.Name" size="mini"
                                :placeholder="OrganizationalStructureSafety.Name">
                                <template slot="prepend">
                                    {{OrganizationalStructureSafety.Name+mark.m}}
                                </template>
                            </el-input>
                        </el-form-item>
                    </div>
                </el-col>
                <el-form-item :xs="6" :sm="6" :md="6" :lg="8" :xl="8">
                    <div class="elst-select-mini">
                        <el-form-item size="mini" label="时间">
                            <el-date-picker v-model="value1" type="daterange" range-separator="至"
                                start-placeholder="开始日期" end-placeholder="结束日期" size="mini">
                            </el-date-picker>
                        </el-form-item>
                    </div>
                </el-form-item>

            </el-row>
        </el-form>
        <el-table :data="TreeTable" style="width: 100%;margin-bottom: 20px;" border
            @selection-change="handleSelectionChange" row-style="height:10px" row-key="id">
            <el-table-column type="selection" align="center" width="55">
            </el-table-column>
			<el-table-column type="index" :label="col.SequenceNumber" :index="indexMethod" width="50"
                        show-overflow-tooltip="true"></el-table-column>
            <el-table-column type="expand" prop="childData">
                <template slot-scope="scope">
                    <el-table :data="scope.row.childData">
                        <el-table-column :label="ScoreAssessmentOfficeSecurity.time" align="center">
                            <template slot-scope="scope">
                                <span>{{scope.row.time}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column :label="ScoreAssessmentOfficeSecurity.type" align="center">
                            <template slot-scope="scope">
                                <span>{{scope.row.type}}</span>
                            </template>
                        </el-table-column>
                        <el-table-column :label="ScoreAssessmentOfficeSecurity.scope" align="center">
                            <template slot-scope="scope">
                                <span>{{scope.row.integral}}</span>
                            </template>
                        </el-table-column>
                    </el-table>
                </template>
            </el-table-column>
            <el-table-column prop="name" :label="ScoreAssessmentOfficeSecurity.name">
                <template slot-scope="scope">
                    <span>{{scope.row.name}}</span>
                </template>
            </el-table-column>
            <el-table-column prop="allScore" :label="ScoreAssessmentOfficeSecurity.scope">
                <template slot-scope="scope">
                    <span>{{scope.row.allScore}}</span>
                </template>
            </el-table-column>
            <el-table-column width="53" :label="col.btnUpdate" fixed="right">
                <template slot-scope="scope">
                    <button type="button" class="elst-bt-xg" @click=UserInput('xg',scope.row.id)>
                        <i class="el-icon-edit"></i>
                    </button>
                </template>
            </el-table-column>
        </el-table>

        <el-dialog title="办公安全分委会积分考核" :visible.sync="ListItem.dialogVisible" @close='closeDialog' width="80%" height="80%"
            top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">

        app = new Vue({
            el: '#app',
            data: function () {
                return {
                    value1: '',
                    TreeTable: [],
                    mydata: ScoreAssessmentOfficeSecurityData,
                    ListItem: ListItem,
                    formInline: {
                        model: { id: '', name: '', allScore: '', time: '', type: '', integral: '' },
                        offset: 0,
                        limit: 10
                    }
                }
            },
            created: function () {
            },
            mounted: function () {
                this.TreeTable = fnCommon(this.mydata, "0");
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
				indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                //查询方法
                onSubmit: function () { onSubmit(this); },
                closeDialog: function () {
                    this.TreeTable = fnCommon(this.mydata, "0");
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                UserInput: function (val, id) { DialogShow(this, val, "ScoreAssessmentOfficeSecurityInput.html", id); },
                onDelete: function () {
                    onDeleteForTree(this, '/api/ScoreAssessmentOfficeSecurity/DeleteMuti');
                },
                handleSelectionChange: function (val) { handleSelectionChange(this, val); },
            }
        });


    </script>

</body>

</html>